#include <iostream>

using namespace std;

struct Date {
	int year;
	int month;
	int day;
};

void cinDate(struct Date &d) {

	cout << "请输入年月日：" << endl;

	cin >> d.year;
	cin >> d.month;
	cin >> d.day;

}

void coutDate(struct Date &d) {

	cout << d.year << "年 " << d.month << "月 " << d.day << "日 " << endl;

}

bool isLeapYear(struct Date &d) {
	if (((d.year % 4 == 0) && (d.year % 100 != 0)) || (d.year % 400 == 0)) {
		return true;
	}
	return false;
}

int main(int argc, char *argv[]) {

	struct Date d1;
	cinDate(d1);
	coutDate(d1);
	if(isLeapYear(d1)){
		cout << "是闰年~" << endl;
	} else {
		cout << "不是闰年~" << endl;
	}

	return 0;
}
